package org.xinghai.sql.main.generator.service;


import com.baomidou.mybatisplus.extension.service.IService;
import org.xinghai.sql.main.dto.CreateColumnDto;
import org.xinghai.sql.main.dto.UpdateColumnDto;
import org.xinghai.sql.main.generator.domain.DatabaseTables;
import org.xinghai.sql.main.generator.domain.TableColumns;

import java.util.List;

/**
* @author lijia
* &#064;description  针对表【table_columns】的数据库操作Service
* &#064;createDate  2025-07-28 11:45:59
* &#064;Entity  generator.domain.TableColumns
 */
public interface TableColumnsService extends IService<TableColumns> {
    //通过表查询列
    List<TableColumns> getList(List<DatabaseTables> databaseTables);

    Integer getColumnIdByColumnName(String foreignColumnName, String columnName);

    Integer getColumnIdByColumnNameAndForeignTableId(Integer foreignTableId, String foreignColumnName);

    void createColumn(CreateColumnDto createColumnDto);

    void updateColumn(UpdateColumnDto updateColumnDto);

    void removeByDatabaseName(String databaseName);
}
